package com.t216.dm216.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.t216.dm216.mapper.DmAreaMapper;
import com.t216.dm216.pojo.DmArea;
import com.t216.dm216.service.DmAreaService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class DmAreaServiceImpl implements DmAreaService {
    @Resource
    private DmAreaMapper dmAreaMapper;
    @Override
    public List<DmArea> getAreaList() {
        LambdaQueryWrapper<DmArea> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.select(DmArea::getId, DmArea::getName);
        return dmAreaMapper.selectList(queryWrapper);
    }
}
